﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;

namespace Jacaranda.Data
{
    public class Transaction
    {
        public DbConnection Connection { get; set; }

        public DbTransaction DbTransaction { get; set; }

        public void Rollback()
        {
            DbTransaction.Rollback();
            Connection.Close();
            Connection.Dispose();
        }

        public void Commit()
        {
            DbTransaction.Commit();
            Connection.Close();
            Connection.Dispose();
        }
    }
}
